
package com.shop.cereshop.app.page.productDetail;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.shop.cereshop.app.annotation.KeepLongAsNumber;
import com.shop.cereshop.app.config.SkuCombinationMapSerializer;
import com.shop.cereshop.app.domain.shop.CustomerServiceDTO;
import com.shop.cereshop.app.page.product.ProductCoupon;
import com.shop.cereshop.commons.domain.buyer.CereBuyerReceive;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Set;

@Data
@ApiModel(value = "ShopProductDetailVO", description = "商品详情返回数据")
public class ShopProductDetailVO {

  // ====================================店铺相关信息=========
  @ApiModelProperty(value = "店铺id")
  @KeepLongAsNumber
  private Long shopId;

  @ApiModelProperty(value = "店铺名称")
  private String shopName;

  @ApiModelProperty(value = "店铺所在城市编码")
  @JsonIgnore
  private String shopCityCode;

  @ApiModelProperty(value = "商家类型 1-同城服务 2-线上商城/同城配送")
  @JsonIgnore
  private Integer type;

  @ApiModelProperty(value = "商家类型 1-同城服务(到店用) 2-线上商城(电商购) 3-同城配送(同城送)")
  private Integer shopType;

  @ApiModelProperty(value = "店铺logo")
  private String shopLogo;

  @ApiModelProperty(value = "店铺评分")
  private BigDecimal shopScore;

//  @ApiModelProperty(value = "店铺营业时间字符串")
//  private String shopWeeksStr;
//
//  @ApiModelProperty(value = "店铺营业时间")
//  private List<String> shopWeeks;

  // ===============================收藏相关信息========================
  @ApiModelProperty(value = "是否收藏")
  private Integer isCollect;

  @ApiModelProperty(value = "收藏id")
  @KeepLongAsNumber
  private Long collectId;

  // ===============================客服信息========================

  @ApiModelProperty(value = "客服信息")
  private CustomerServiceDTO customerService;

  // ==============================商品相关信息====================
  @ApiModelProperty(value = "商品id")
  @KeepLongAsNumber
  private Long productId;

  @ApiModelProperty(value = "商品名称")
  private String productName;

  @ApiModelProperty(value = "商品简介")
  private String productBrief;

  @ApiModelProperty(value = "商品售卖类型 1-同城服务 2-线上商城 3-同城配送")
  private Integer productType;

  @ApiModelProperty(value = "商品详情描述")
  private String productText;

  @ApiModelProperty(value = "商品分类id")
  @KeepLongAsNumber
  private Long classifyId;

  @ApiModelProperty(value = "商品分类名称")
  private String classifyName;

  @ApiModelProperty(value = "商品图片数组")
  private List<String> images;

  @ApiModelProperty(value = "商品虚拟销量")
  @KeepLongAsNumber
  private Long fictitiousNumber;

  @ApiModelProperty(value = "商品实际销售量")
  @KeepLongAsNumber
  private Long salesVolume;

  @ApiModelProperty(value = "商品总销量")
  @KeepLongAsNumber
  private Long finalSales;

  @ApiModelProperty(value = "商品有效天数")
  private Integer validDays;

  @ApiModelProperty(value = "商品服务标签")
  private List<String> productLabels;

  // ================用户相关信息==================
//  @ApiModelProperty(value = "收货地址")
//  private CereBuyerReceive receive;

  // ===============规格相关信息===================

  @ApiModelProperty(value = "商品规格分组列表，用于规格选择器")
  private List<SpecificationDTO> specifications;

  @ApiModelProperty(value = "所有SKU列表")
  private List<SkuDTO> skus;

//  @ApiModelProperty(value = "可用的规格组合key")
//  private Set<String> availableKeys;

//  @ApiModelProperty("规格组合到SKU ID的映射，格式示例：{'颜色:黑色,尺寸:XL': 1001}")
//  @JsonSerialize(using = SkuCombinationMapSerializer.class)
//  private Map<String, Long> skuCombinationMap;

  //==================优惠券======================
  @ApiModelProperty(value = "平台优惠券数据")
  private List<ProductCoupon> platformCoupons;

  @ApiModelProperty(value = "店铺优惠券数据")
  private List<ProductCoupon> shopCoupons;

  @ApiModelProperty(value = "优惠券拼接字段")
  private String couponSplicing;

  @ApiModelProperty(value = "优惠券图片数组")
  private List<String> couponImages;

}